package ooexercise01;

public class Animal {
    /*
    String name;
    int age;
    String colour;

    Animal(String name, int age, String colour){
        this.name = name;
        this.age = age;
        this.colour = colour;
    }

    void drink(){
        System.out.println(age+"岁的"+colour+name+"在喝水……");
    }
    void eat(){
        System.out.println(age+"岁的"+colour+name+"在吃饭……");
    };

     */

    String name;
    int age;
    String colour;

    Animal(String name, int age, String colour){
        this.name = name;
        this.age = age;
        this.colour = colour;
    }

    void drink(){
        System.out.println(age+"岁的"+colour+name+"在喝水……");
    }
    void eat(){
        System.out.println(age+"岁的"+colour+name+"在吃饭……");
    };


}
